home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 January - Disc 2 / Macworld (1999-01) (Disk 2).dmg / Mac OS 8.5 Updaters / RealPC⁄Soft Windows / SoftWindows / SoftWindows Upgrade Disk / INSIGNIA / W31BATCH.BAT < prev    next >
Encoding:
DOS Batch File  |  1998-08-24  |  4.9 KB  |  189 lines

  1. rem [
  2. rem    Name:        u.w31batch.bat
  3. rem
  4. rem    Derived from:    (original)
  5. rem
  6. rem    Author:        David Lillie
  7. rem
  8. rem    Created on:    Sep 1996
  9. rem
  10. rem    Sccs ID:    @(#)u.w31batch.bat    1.17 10/02/97
  11. rem
  12. rem    Coding Stds:    
  13. rem
  14. rem    Purpose:    Windows 3.1x update batch file for SoftPC TURBO and
  15. rem            SoftWindows. This file triggers the process of copying
  16. rem            the new Insignia drivers to the C: drive and then
  17. rem            patches the Windows 3.1x drivers.
  18. rem
  19. rem    Parameters:    1    FSA directory for split Windows setup.
  20. rem                = c:\windows for hard disk only setup.
  21. rem            2    Windows system directory.
  22. rem            3    Intel OS; must be in a form understood by
  23. rem                inspatch.exe i.e. "win311" or "wfw311"
  24. rem            4    Host OS ("mac", "unix", etc.)
  25. rem            5    two-letter language ID
  26. rem            6    old serial number (8 hex digits)
  27. rem
  28. rem    Copyright 1997 Insignia Solutions PLC. All rights reserved.
  29. rem ]
  30.  
  31.  
  32. if not exist %2\user.exe goto End
  33.  
  34. echo Updating your configuration. Please wait...
  35.  
  36. rem  Determine whether this is a new copy of Windows or an upgrade.
  37. rem  A new copy of Windows is identified by:
  38. rem    1. new clean disk - serial no. = F0xxxxxx
  39. rem    2. user installed Windows over DOS - serial no. = F[14-F]xx[0-1]xxx
  40.  
  41. ibatch majorVer = 0x%6 ">>" 24     #04lx
  42. ibatch os       = 0x%6 "&"  0xf000 #06lx
  43. echo  %0: majorVer=%majorVer%  os=%os%            >>c:\insignia\up.log
  44. itest %majorVer% "==" 0xf0
  45. if errorlevel 1 goto newWin
  46. itest %majorVer% ">=" 0xf4
  47. if not errorlevel 1 itest %majorVer% "==" 0xf1
  48. if errorlevel 1 itest %os% "<=" 0x1000
  49. if errorlevel 1 goto newWin
  50.  
  51. echo Upgrading a previously-used copy of Windows.    >>c:\insignia\up.log
  52.  
  53. rem  Upgrade Insignia WinSock DLLs, but don't touch MS versions.
  54. call updatins winsock.dll %2
  55. call updatins wsock32.dll %2
  56. goto allWin
  57.  
  58. :newWin
  59. echo Upgrading a new copy of Windows.            >>c:\insignia\up.log
  60.  
  61. rem  Use the Insignia WinSock DLLs by default.
  62. copy /y /b c:\insignia\winsock.dll %2            >>c:\insignia\up.log
  63. copy /y /b c:\insignia\wsock32.dll %2            >>c:\insignia\up.log
  64.  
  65. rem  Copy across any further files that are language specific (STARTUP.GRP)
  66. rem  NB .grp files and progman.ini are on C: even in a split Windows setup.
  67. rem  The name of the startup group is language-dependent.
  68. call findsug sg_name %5
  69. echo copying d:\insignia\%4\startup.%5 to c:\windows\%sg_name%    >>c:\insignia\up.log
  70. copy /y /b   d:\insignia\%4\startup.%5    c:\windows\%sg_name%    >>c:\insignia\up.log
  71. set sg_name=
  72. goto allWin
  73.  
  74. :allWin
  75. set majorVer=
  76. set os=
  77.  
  78. rem Initially indicate we want to patch everything
  79. set PatchVTD=TRUE
  80. set PatchGDI=TRUE
  81. set PatchLDR=TRUE
  82. set PatchVMM=TRUE
  83. set PatchV7V=TRUE
  84. set PatchKRN=TRUE
  85.  
  86. set WinVer=%3
  87.  
  88. goto lang_%5
  89.  
  90. :lang_us
  91. echo Updating US version of Windows
  92. :us_and_others
  93. goto PatchFiles
  94.  
  95. :lang_fr
  96. echo Updating French version of Windows
  97. goto us_and_others
  98.  
  99. :lang_gr
  100. echo Updating German version of Windows
  101. goto us_and_others
  102.  
  103. :lang_it
  104. echo Updating Italian version of Windows
  105. goto us_and_others
  106.  
  107. :lang_jp
  108. echo Updating Japanese version of Windows
  109. set PatchV7V=FALSE
  110. set PatchKRN=FALSE
  111. set WinVer=win310
  112. goto PatchFiles
  113.  
  114. :lang_kr
  115. echo Updating Korean version of Windows
  116. set PatchV7V=FALSE
  117. set PatchKRN=FALSE
  118. set WinVer=win310
  119. goto PatchFiles
  120.  
  121. rem What is the correct two-letter code for Thai?
  122. :lang_THAI
  123. echo Updating Thai version of Windows
  124. goto PatchFiles
  125.  
  126. rem What is the correct two-letter code for Chinese (Simplified)?
  127. :lang_CHINS
  128. echo Updating Chinese version of Windows (Simplified)
  129. set PatchV7V=FALSE
  130. set PatchKRN=FALSE
  131. set WinVer=win310
  132. goto PatchFiles
  133.  
  134. rem What is the correct two-letter code for Chinese (Traditional)?
  135. :lang_CHINT
  136. echo Updating Chinese version of Windows (Traditional)
  137. set PatchV7V=FALSE
  138. set PatchKRN=FALSE
  139. set WinVer=win310
  140. goto PatchFiles
  141.  
  142. :PatchFiles
  143. c:
  144. cd \insignia
  145.  
  146. rem We need to work out which VTD to patch
  147.  
  148. find /v ";" c:\windows\system.ini | find /i "device=vtda.386" >nul:
  149. if not errorlevel 1 goto VTDASection
  150.  
  151. find /v ";" c:\windows\system.ini | find /i "device=vtd.386" >nul:
  152. if not errorlevel 1 goto VTDSection
  153.  
  154. rem The following sections patch the components we are interested in
  155.  
  156. rem Patch the VTD in the WIN386 file
  157. if %PatchVTD%==TRUE call patchone win386.exe %2 -VTD -%WinVer%
  158. goto PatchTheRest
  159.  
  160. :VTDASection
  161. rem Patch the VTDA file
  162. if %PatchVTD%==TRUE call patchone vtda.386 %2 -VTD -%WinVer%
  163. goto PatchTheRest
  164.  
  165. :VTDSection
  166. rem Patch the VTD file
  167. if %PatchVTD%==TRUE call patchone vtd.386 %2 -VTD -%WinVer%
  168.  
  169. :PatchTheRest
  170.  
  171. :GDISection
  172. if %PatchGDI%==TRUE call patchone gdi.exe %2 -GDI
  173.  
  174. :V7VSection
  175. if %PatchV7V%==TRUE call patchone v7vdd.386 %2 -V7VDD
  176.  
  177. :KRNSection
  178. if %PatchKRN%==TRUE call patchone krnl386.exe %2 -KRNL386 -%4
  179.  
  180. :LDRSection
  181. if %PatchLDR%==TRUE call patchone win386.exe %2 -WIN386 -LOADER -%WinVer%
  182.  
  183. :VMMSection
  184. if %PatchVMM%==TRUE call patchone win386.exe %2 -WIN386 -VMM -%WinVer%
  185.  
  186. :UpdateINIs
  187. win31lic /v /s%2 c:\insignia\win311.ugd    >>c:\insignia\up.log
  188. :End
  189.